import axios from 'axios'

const service = axios.create({
  baseURL: process.env.VUE_APP_BASE_API, // 设置axios请求的基础地址
  timeout: 200000 // 定义20秒超时
})

service.interceptors.request.use(
  config => {
    return config
  },
  error => {
    return Promise.reject(error)
  }
)

service.interceptors.response.use(
  response => {
    return response
  },
  error => {
    return Promise.reject(error)
  }
)

export default service
